//
//  Articles.swift
//  Jock
//
//  Created by HD on 15/4/6.
//  Copyright (c) 2015年 Haidy. All rights reserved.
//

import Foundation

class Articles {
    
    var a: Int!
    var t_all: Int!
    var t: Int!
    
    func saveValue(config: BaseConfig) {
        config.saveValue(a, key: "Artiles_a")
        config.saveValue(t_all, key: "Artiles_t_all")
        config.saveValue(t, key: "Artiles_t")
    }
    
    ///解析数据
    class func parser(json: JSON) -> Articles {
        var articles = Articles()
        articles.a = json["a"].intValue
        articles.t_all = json["t_all"].intValue
        articles.t = json["t"].intValue
        return articles
    }
}